<wxs module="dateFr" src="../../js/filter.wxs"></wxs>
<import src="../detail/detail" />
<template is="{{template}}" data="{{my_toast_tip: my_toast_tip}}" />
<!-- 浮层 -->
<view id='float_view' wx:if="{{showFloat}}" bindtap='hideOrder'></view>
<!-- 订单确认页 -->
<view id='oderView' wx:if="{{showOrdermsg}}">
    <label class="oderView_title">订单确认</label>
    <div>
        <label>{{orderMsgaddress}}:</label><span>{{orderMsgaddressNote}}</span></div>
    <div>
        <label>{{orderMsgTime}}:</label><span>{{orderMsgTimeNote}}</span></div>
    <label class="oderView_msg">请在商城开放时间完成订餐操作，如在关闭时间订餐，选择的时间会在下次开店时间内生效</label>
    <label class="makeSure" bindtap='payMakersure'>确定</label>
</view>
<!-- 自定义事件选择器-->
<view id='time_picker' wx:if='{{showTimePick}}'>
    <view id='time_type'>
        <label class="{{item.style}}" data-type='{{index}}' wx:for='{{timeType}}' style='width: {{750/timeType.length+"rpx"}}'>{{item.name}}</label>
        <span wx:if='{{timeType.length>0}}' style="left:325rpx"></span>
    </view>
    <picker-view indicator-style="height: 50px;" bindchange="bindChange" value='{{chooseTime}}'>
        <picker-view-column wx:for='{{pickerArr}}'>
            <view wx:for="{{item.timeArr}}" style="line-height: 50px;">{{item}}</view>
        </picker-view-column>
    </picker-view>
    <view id='rules'>
        <label>每天提取有效时间段:<span>{{timeNote.start}}--{{timeNote.end}}</span></label>
        <label>请指定时间及时取餐，以免影响送达</label>
    </view>
    <view id='makeSure_view'>
        <label bindtap='cancelTimeAction'>取消</label>
        <label bindtap='makeTimeAction'>确认</label>
    </view>
</view>
<!-- 自定义支付类型选择 -->
<view id='pay_picker' wx:if='{{showPayPick}}'>
    <label bindtap='cancelPayAction'>选择支付方式
        <image src="{{imageUrl}}/meal_icon_delete.png"></image>
    </label>
    <label bindtap='choosePatType' data-code='0'>
        <image class='logo_style' src="{{urlAddress}}/pay_balance.png"></image><span>余额剩余:{{balance}}元</span>
        <image wx:if='{{payType=="4"}}' class='select_styles' src="{{urlAddress}}/pay_select.png"></image>
        <image wx:if='{{payType=="1"}}' class='select_styles' src="{{urlAddress}}/pay_unselect.png"></image>
    </label>
    <view class="line"></view>
    <label bindtap='choosePatType' data-code='1'>
        <image class='logo_style' src="{{urlAddress}}/icon_wechat.png"></image><span>微信支付</span>
        <image wx:if='{{payType=="1"}}' class='select_styles' src="{{urlAddress}}/pay_select.png"></image>
        <image wx:if='{{payType=="4"}}' class='select_styles' src="{{urlAddress}}/pay_unselect.png"></image>
    </label>
</view>
<!-- 页面 -->
<view id='payView'>
    <!-- <image class='bg_style' src="{{imageUrl}}/reserveBackground.png" /> -->
    <div style="display: block;height: 20rpx;"></div>
    <view id='topView'>
        <view id='nMenu'>
            <image src="{{imageUrl}}/meal_icon_jiucan.png" />
            <label>就餐方式</label>
            <div>
                <label bindtap='chooseWay' data-code='10' class="{{zitiStyle}}">自提</label>
                <label bindtap='chooseWay' data-code='20' class="{{sendStyle}}">外卖</label>
            </div>
        </view>
        <view id='changeView'>
            <view id='getSelf' wx:if='{{type=="1"}}'>
                <view class='address_view'>
                    <image class='topImg' src="{{urlAddress}}/mxShop.png" />
                    <!-- <image src="{{imageUrl}}/meal_icon_time.png" /> -->
                    <label>自提地址</label>
                    <label>
                        <navigator url='/pages/reserveAddress/reserveAddress?type=1&addressStr={{addressString?addressString:"暂无"}}' hover-class="none">
                            <view class='blue_style'>{{addressString||"请选择"}}</view>
                            <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                        </navigator>
                    </label>
                </view>
                <view class='line_s'>
                    <label></label>
                </view>
                <view class='time_view'>
                    <image class='bootImg'  src="{{imageUrl}}/meal_icon_time.png" />
                    <label>自提时间</label>
                    <label>
                        <view bindtap='timePickerAction' class='blue_style'>
                            {{timeString}}
                        </view>
                        <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                    </label>
                </view>
            </view>
            <view id='getWait' wx:if='{{type=="2"}}'>
                <view class='address_view'>
                    <image class='bootImg' src="{{imageUrl}}/meal_icon_location2.png" />
                    <label>配送地址 </label>
                    <label>
                        <view bindtap='addressPickerAction'>
                            <navigator class='blue_style' url='/pages/reserveAddressList/reserveAddressList?type=2&addressId={{addressId}}' hover-class="none">
                                {{chooseAddress||"请选择"}}
                            </navigator>
                        </view>
                        <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                    </label>
                </view>
                <view class='line_s'>
                    <label></label>
                </view>
                <view class='time_view'>
                    <image class='bootImg' src="{{imageUrl}}/meal_icon_time.png" />
                    <label>配送时间</label>
                    <label>
                        <view bindtap='timePickerAction' class='blue_style'>
                            {{peisongTime}}
                        </view>
                        <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                    </label>
                </view>
            </view>
            <view id='waitSend'>
            </view>
        </view>
    </view>
    <view id='goods'>
        <view class='items_style'>
            <image class='goodsImg' wx:if="{{shopMarket.goodsImg=='null'}}" src="{{imageUrl}}/xiaomai.jpg" />
            <image class='goodsImg' wx:if="{{shopMarket.goodsImg!='null'}}" src="{{shopMarket.goodsImg}}" />
            <label class="goods_num">
                <p>×</p>1
            </label>
            <label class="goods_name">
                <image class='tuan_logo' src="{{urlAddress}}/tuan_logo.png" />
                <p>{{shopMarket.goodsName}}</p>
            </label>
            <label class="goods_money">
                <p>团价：¥{{shopMarket.groupPrice}}</p>
                <span wx:if='{{shopMarket.groupPrice!=shopMarket.originalPrice}}'>¥{{shopMarket.originalPrice}}<view wx:if='{{shopMarket.groupPrice!=shopMarket.originalPrice}}' class="line"></view></span>
            </label>
        </view>
        <view class='pp_items'>
            <view class="line_top"></view>
            <label class="p_name"><span>送</span>配送费</label>
            <label class="p_money">
                <p><span>¥1.50</span>¥0.00</p>
                <image class="icon" src='{{urlAddress}}/icon_next.png' style='opacity: 0;'></image>
            </label>
        </view>
        <!-- <view class='line_l'>
            <label></label>
        </view> -->
        <view id='order_msg'>
            <navigator class='' url='/pages/reserveNote/reserveNote' hover-class="none">
                <view class='p_items'>
                    <label class="p_name">订单备注</label>
                    <label class="p_msg">
                        <label wx:if='{{chooseNote}}'>{{chooseNote}}</label>
                        <label class="no_note" wx:if='{{!chooseNote}}'>口味喜好</label>
                        <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                    </label>
                </view>
            </navigator>
            <view class='line_l'>
                <label></label>
            </view>
            <view class='p_items'>
                <label class="p_name">支付方式</label>
                <label class="p_money" bindtap='payPickerAction'>
                    <label>{{payText}}</label>
                    <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                </label>
            </view>
        </view>
    </view>
</view>
<button wx:if='{{isNeedwx}}' class="nickname-btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
    <image wx:if='{{isNeedwx}}' src="../../image/nicheng.png"></image>完善昵称
</button>
<text wx:if='{{isNeedwx}}' class="nickname-hit">获取微信昵称，有助于为您配送</text>
<view id='pay_bottom'>
    <label class="pay_left">
        <p>团价：</p>¥{{shopMarket.groupPrice}}
        <span wx:if='{{shopMarket.groupPrice!=shopMarket.originalPrice}}'>¥{{shopMarket.originalPrice}}<view wx:if='{{shopMarket.groupPrice!=shopMarket.originalPrice}}' class="line"></view></span>
        <!-- <span>¥{{shopMarket.originalPrice}}</span></label> -->
    </label>
    <form bindsubmit="formSubmit" report-submit="true">
        <button formType="submit">
            <!-- <label bindtap='payAction'>立即支付</label> -->
            立即支付
        </button>
    </form>
</view>
<!--密码-->
<view id='passWord_view' wx:if="{{isShow}}">
    <view id='pw'>
        <image class='clo_style' bindtap="closeView" src="../../image/icon_clo.png"></image>
        <input type="number" bindblur='hideView' placeholder="这是一个可以自动聚焦的input" focus='{{input_type}}' bindinput="getPassWord" />
        <label class="msg">请输入余额支付密码</label>
        <label class="point">
            <li wx:for="{{styleList}}" wx:key='{{index}}'><span class="{{item}}"></span></li>
        </label>
    </view>
</view>
<!--拼团信息-->
<view class='ding'></view>